<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="java.util.*" %>
<%@ page import="com.ionglobal.db.*" %>
<%@ page import="com.ionglobal.lib.*" %>
<%@ page import="com.ionglobal.misc.*" %>
<%@ page import="com.ionglobal.cms.*" %>

<%@ include file="../init_include.jsp" %>

<%
	int check_rst=Permission.accept(dbi,session,request,"sysop","tree","catid","000001000"); 	
	if (check_rst!=Permission.CHECK_RST_SUCCESS) {
		dbi.closeAll();
		if (check_rst==Permission.CHECK_RST_DENY)
			response.sendRedirect("../deny.html");
		else
			response.sendRedirect("../index.jsp");
		return;		
	}
	
	if(request.getParameter("id")!=null) {
		String iditem=request.getParameter("id").trim();
		iditem=iditem.substring(0,iditem.length()-1);
		Archive.deleteArchives(dbi,iditem);

		Sysop sysop=(Sysop)session.getAttribute("sysop");		
		OperationLog log=new OperationLog();
		log.setCrUser(sysop.getName());
		log.setDescript(iditem);
		log.setModuleCode("cms");		
		OperationLogApp.Delete(dbi,log);	
	}
%>
<%=Language.getNameByCode("cms.deletesuccessful","Delete archive successfully!")%>
	
<script Language="JavaScript" src="../script/Ion_Show.js"></script> 
<script language="javascript">
	closewindow(0);
</script>	
<%@ include file="../init_free.jsp" %>
